﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Gargoyle.Roton
{
    /// <summary>
    /// The base input interface for Roton.
    /// </summary>
    public class Input
    {
        /// <summary>
        /// If true, indicates Shift is currently pressed.
        /// </summary>
        public bool Shift;

        /// <summary>
        /// If true, indicates Alt is currently pressed.
        /// </summary>
        public bool Alt;

        /// <summary>
        /// If true, indicates Ctrl is currently pressed.
        /// </summary>
        public bool Ctrl;

        /// <summary>
        /// When overridden, clear the currently pressed key.
        /// </summary>
        public virtual void ClearPressedKey()
        {
            return;
        }

        /// <summary>
        /// When overridden, get the currently pressed key. This is called internally from Roton and should not be used externally.
        /// </summary>
        /// <returns>The currently pressed key.</returns>
        public virtual Keys GetPressedKey()
        {
            return Keys.None;
        }

        /// <summary>
        /// When overridden, submit a Key Down event to the interface. This should be used to send key messages to Roton.
        /// </summary>
        /// <param name="key">The key to submit.</param>
        public virtual void KeyDown(Keys key)
        {
            return;
        }

        /// <summary>
        /// When overridden, submit a Key Up event to the interface. This should be used to send key messages to Roton.
        /// </summary>
        /// <param name="key">The key to submit.</param>
        public virtual void KeyUp(Keys key)
        {
            return;
        }

        /// <summary>
        /// When overridden, poll for new key info. This is called internally from Roton and should not be used externally.
        /// </summary>
        public virtual void Poll()
        {
            return;
        }
    }

}
